import { uploadType } from '@/utils/util'
export const basicFields = [
	{
		type: 'DividerHtml',
		text: 'HTMl',
		icon: 'text-field',
		option: {
			type: 'DividerHtml',
			modelValue: '这是标题',
			span: 24,
		},
		event: {},
	},
	{
		type: 'input',
		text: '文本域',
		icon: 'text-field',
		option: {
			label: '名称',
			prop: 'propFieldInput',
			type: 'textarea',
			append: '',
			rules: [],
			span: 8,
		},
		event: {},
	},
	{
		type: 'input',
		text: '输入框',
		icon: 'text-field',
		option: {
			label: '输入',
			prop: 'propFieldInput',
			type: 'input',
			append: '',
			rules: [],
			span: 8,
		},
		event: {},
	},
	{
		type: 'RangeValue',
		text: '区间取值',
		icon: 'text-field',
		option: {
			label: '区间',
			prop: 'ageBetween',
			type: 'RangeValue',
			rules: [],
			span: 8,
		},
		event: {},
	},
	{
		type: 'remoteSelect',
		text: '字典选择',
		icon: 'text-field',
		option: {
			label: '字典',
			prop: 'propFieldCode',
			propName: 'propFieldCodeName',
			type: 'remoteSelect',
			code: 'ECONOMIC_SITUATION',
			api: 'getDictItemList',
			filterKey: 'value',
			filterLabel: 'label',
			multiple: false,
			span: 8,
		},
		event: {},
	},
	{
		type: 'select',
		text: '下拉选择',
		icon: 'text-field',
		option: {
			label: '下拉',
			prop: 'propField',
			propName: 'propFieldName',
			type: 'select',
			span: 8,
			dicData: [
				{ label: '是', value: 1 },
				{ label: '否', value: 0 },
			],
		},
		event: {},
	},
	{
		type: 'radio',
		text: '单项选择',
		icon: 'text-field',
		option: {
			label: '单选',
			prop: 'propField',
			propName: 'propFieldName',
			type: 'radio',
			span: 8,
			dicData: [
				{ label: '是', value: 1 },
				{ label: '否', value: 0 },
			],
		},
		event: {},
	},
	{
		type: 'upload',
		text: '上传单张照片',
		icon: 'text-field',
		option: {
			label: '照片',
			tip: '',
			prop: 'image',
			type: 'upload',
			labelPosition: 'top',
			showFileList: false,
			limit: 1,
			multiple: false,
			span: 24,
		},
		event: {},
	},
	{
		type: 'upload',
		text: '上传文件',
		icon: 'text-field',
		option: {
			label: '上传文件',
			prop: 'fileList',
			type: 'upload',
			fileType: uploadType.fileMetaType,
			listType: 'text',
			labelPosition: 'top',
			showFileList: true,
			limit: 4,
			multiple: true,
			span: 12,
		},
		event: {},
	},
	{
		type: 'AplidAreaSelect',
		text: '区域选择',
		icon: 'text-field',
		option: {
			label: '区域',
			prop: 'areas',
			propName: 'areasName',
			type: 'AplidAreaSelect',
			span: 12,
		},
		event: {},
	},
	{
		type: 'date',
		text: '日期选择',
		icon: 'text-field',
		option: {
			label: '日期',
			prop: 'nowDate',
			type: 'date',
			format: 'YYYY年MM月DD日',
			valueFormat: 'YYYY-MM-DD',
			span: 12,
		},
		event: {},
	},
	{
		type: 'datetime',
		text: '日期时间',
		icon: 'text-field',
		option: {
			label: '日期时间',
			prop: 'nowDate',
			type: 'datetime',
			format: 'YYYY年MM月DD HH:mm:ss',
			valueFormat: 'YYYY-MM-DD HH:mm:ss',
			span: 12,
		},
		event: {},
	},
	{
		type: 'ueditor',
		text: '富文本',
		icon: 'text-field',
		option: {
			label: '内容',
			prop: 'content',
			type: 'ueditor',
			span: 24,
		},
		event: {},
	},
]
